export interface ResponseData {
  code: number
  ok: boolean
  message: string
}

export interface User {
  name: string
  token: string
}

export interface UserResponseData extends ResponseData {
  data: User
}

export interface CodeResponseData extends ResponseData {
  data: number
}

export interface LoginParams {
  phone: string
  code: string
}

// 用户仓库的类型定义
export interface UserStore {
  visiable: boolean
  userInfo: User
}

export interface WxParams {
  redirectUri: string
  appid: string
  scope: string
  state: string
}

export interface WxResponseData extends ResponseData {
  data: WxParams
}

export interface AuthUser {
  authStatus: number
  certificatesNo: string
  certificatesType: string
  certificatesUrl: string
  createTime: string
  id: number
  isDeleted: number
  name: string
  nickName: string
  openid: string
  param: {}
  phone: string
  status: number
  updateTime: string
}

export interface AuthUserResponseData extends ResponseData {
  data: AuthUser
}

export interface UserAuthInterface {
  certificatesNo: string
  certificatesType: string
  certificatesUrl: string
  name: string
}

export interface Dict {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param: {}
  parentId: number
  name: string
  value: string
  dictCode: string
  hasChildren: boolean
}

export type DictArr = Dict[]

export interface DictResponseData extends ResponseData {
  data: DictArr
}

export interface Address {
  createTime: string
  dictCode: string
  hasChildren: false
  id: number
  leaf: boolean
  isDeleted: number
  name: string
  param: {}
  parentId: number
  updateTime: string
  value: string
  children: Address[]
}

export interface AddressResponseData extends ResponseData {
  data: Address[]
}
